<include file="Public:_header" />
<script src="weixin_statics/js/icheck.min.js" type="text/javascript"></script>
<script language="javascript">
        function submit()
        {
            /*if($("#province").val()=="请选择省份名"||$("#city").val()=="请选择城市名")
            {
                $("#addressmsg").show();
                return;
            }
            else
            {
                $("#addressmsg").hide();
            }*/
            /*$(".gwlist-box").hide();*/
             $("#subform").submit();
        }
        $(document).ready(function(){

            /* $(".send  span").bind("click",function(){
                 $(".twlist-tj").show();
             });
*/

            $(".gwlist-box .close").bind("click",function(){
                $(".gwlist-box").hide();
            });

            $(".twlist-tj .close").bind("click",function(){
                $(".twlist-tj").hide();
            });
            $(".wei_send .close").bind("click",function(){
                $(".wei_send").hide();
            });

            $('input').iCheck({
                checkboxClass: 'icheckbox_square-blue',
                radioClass: 'iradio_square-blue',
                increaseArea: '20%' // optional
            });

            $('#province').easyDropDown({
                cutOff: 10,
                wrapperClass: 'dropdown',
                onChange: function(selected) {
                    $("#city").easyDropDown("destroy");
                    $("#city").easyDropDown({
                        cutOff: 10,
                        wrapperClass: 'dropdown',
                        onChange: function (selected) {

                        }
                    });
                }
            });

            $(".serch-btn").bind("click",function(){
                $(".gwlist-box").show();
            })

        });
    </script>
<div class="warp">
    <!--<a href="javascript:" class="serch-btn">筛选</a>-->
    
    <div class="gwlist-box" style="display:none;">
        <i class="close"><img src="weixin_statics/images/close.png" alt=""></i>
        <form action="__URL__/nearlist" method="post" id="subform">
        <ul class="gw-box-list">

            <li class="title">选择地区：</li>
            <li><select name="pro" class="pro" id="pro">
                <option value="0" selected>省</option>
                <volist name="pro" id="p">
                <option  value="{$p.area_id}">{$p.title}</option>
                </volist>
              </select>
              <select name="city" class="city " id="city">
                <option value="0" selected>市</option>
              </select>
              <select name="area" class="area " id='area '>
                <option value="0" selected>区</option>
              </select></li>
            <!-- <li><select  name="province" id="province" onChange="select()" class="dropdown">
               </select><select name="city" id="city" class="dropdown">
               </select><span id="addressmsg" style="display: none;padding-left: 10px;color: red">*请选择地区</span></li> -->
            <li class="title">选择岗位：</li>
            <li>
                <volist name="hangye" id="ho">
                    <span class="ylist"><input type="checkbox" value="{$ho.id}">&nbsp;&nbsp;{$ho.h_name}<br/>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<volist name="ho.posi" id="po">&nbsp;&nbsp;<input type="checkbox" value="{$po.pid}" name="yxxl[]">&nbsp;{$po.p_name}</volist></span></volist></li>
        </ul>
        <a href="javascript:submit()" class="submit">提交</a>
    </form>
    </div>
    <div class="twlist-tj" style="display:none;">
        <i class="close"><img src="weixin_statics/images/close.png" alt=""></i>
        <div class="twlist-tin">
            <img src="weixin_statics/images/ok.png" alt="">投递成功！
        </div>
    </div>
    <div class="wei_send" style="display:none;">
        <i class="close"><img src="weixin_statics/images/close.png" alt=""></i>
        <div class="twlist-tin">
            <img src="weixin_statics/images/ok.png" alt="">您已经投递成功！<br />一周之内不能重复投递！
        </div>
    </div>
    <ul class="serch-list">
    <volist name="jobs" id="j">
        <li>
            <i class="more"><a href="__ROOT__/weixin.php?s=/Hiring/gwshow/hiring_id/{$j.hiring_id}"><img src="weixin_statics/images/arrow_right.png" alt=""></a></i>
            <h2><a href="__ROOT__/weixin.php?s=/Hiring/gwshow/hiring_id/{$j.hiring_id}">{$j.title}({$j.far}m)</a></h2>
            <h5><a href="__ROOT__/weixin.php?s=/Companyreview/company_info/cid/{$j.cid}">{$j.cid|format_companyname}</a></h5>
            <div class="info">
                {$j.worktime|format_worktime}，{$j.salary}元<br />
                    基本要求：{$j.sex|format_xingbie}、{$j.age_start}岁--{$j.age_end}岁、{$j.edu|format_xueli|default="不限"}<br />
                    工作地点：{$j.sname|default="就近分配"}
            </div>
            <div class="send">
                <span><a href="javascript:void(0);" onClick="sendresume({$j.hiring_id})">投简历</a></span>
                <a href="javascript:"><img src="weixin_statics/images/send.png" alt=""></a>
            </div>
        </li>
        </volist>
    </ul>
    <!--<ul class="serch-page">
        <a href="{$uppage}" class="page-btn prev">上一页</a><a href="{$nextpage}" class="page-btn next">下一页</a>
    </ul>-->
</div>
</body>
<script type="text/javascript" src="weixin_statics/js/city.js"></script>
<script src="weixin_statics/js/jquery.easydropdown.js" type="text/javascript"></script>
</html>
<script>
function sendresume(val){
    var url1 = "{:U('Resume/resume_01')}";
    var url2 = "__ROOT__/weixin.php?s=/Resume/resume_01/edit/1";
    var url3 = "{:U('Resume/resume_02')}";
        $.post("__URL__/send_resume", { "hiring_id": val},
           function(data){
            if (data.status==1) {
                $(".twlist-tj").show(); 
            }else if(data.status==0){
                $(".wei_send").show();
            }else if(data.status==2){
                alert('您还没有创建简历，请填写您的简历！');
                window.location.href= url1;
            }else if(data.status==3){
                alert('您的信息尚不完整，请修改您的简历！');
                window.location.href= url2;
            }else{
                alert('您的信息尚不完整，请补充您的简历！');
                window.location.href= url13;
            }
           }, "json");
}
  $(document).ready(function(){
  
    $(".pro").change(function(){
      pro = $(this).val();
      $.post('__URL__/getarea',{type:'city',aid:pro},function(res){
        $(".city option").remove();
        $(".city").append("<option value='0'>市</option>");
        for(i=0;i<res.length;i++){
          $(".city").append("<option value='"+res[i]['area_id']+"'>"+res[i]['title']+"</option>");
        }
        //alert(res);
      },'json');
    });
    $(".city").change(function(){
      city = $(this).val();
      $.post('__URL__/getarea',{type:'area',aid:city},function(res){
        $(".area option").remove();
        $(".area").append("<option value='0'>区</option>");
        for(i=0;i<res.length;i++){
          $(".area").append("<option value='"+res[i]['area_id']+"'>"+res[i]['title']+"</option>");
        }
        //alert(res);
      },'json');
    });
   $(".hpro").change(function(){
      pro = $(this).val();
      $.post('__URL__/getarea',{type:'city',aid:pro},function(res){
        $(".hcity option").remove();
        $(".hcity").append("<option value='0'>市</option>");
        for(i=0;i<res.length;i++){
          $(".hcity").append("<option value='"+res[i]['area_id']+"'>"+res[i]['title']+"</option>");
        }
        //alert(res);
      },'json');
    });
  
  });

</script>